<script setup>
import {onMounted, ref} from 'vue';
import { useRouter } from 'vue-router';

const router = useRouter();
const successMessage = ref('支付成功！');

const goBack = () => {
  router.push('/homepage');
};

const autoGoBack = () => {
  setTimeout(() => {
    router.push('/homepage');
  }, 3000);
};

onMounted(() => {
  autoGoBack();
})
</script>

<template>
  <div class="pay-success-page" style="color: #42b983">
    <van-icon name="wechat-pay" size="10rem" style="margin-top:20vh" color="#42b983" />
    <div style="font-size: 1rem">支付成功！</div>
  </div>
</template>

<style scoped>
.pay-success-page {
  text-align: center;
}
</style>